package org.fanfan.struts.actionForms;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class MapForm extends ActionForm {
	private static String[] skillLevels = new String[]{"beginner", "intermedia", "advanced"};
	private Map skills = new HashMap();
	
	@Override
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		super.reset(mapping, request);
		skills.clear();
	}

	public Object getSkill(String key){
		return skills.get(key);
	}
	
	public void setSkill(String key, Object value){
		skills.put(key, value);
	}
	
	public Map getSkills(){
		return skills;
	}
	
	public String[] getSkillLevels(){
		return skillLevels;
	}
}
